package com.memo.model;

import android.app.Activity;
import android.text.Editable;
import android.text.TextWatcher;
import android.widget.EditText;

import com.memo.Adpter.recy_adpter;
import com.memo.SQL.memosql;

public class searchmodel {
    Activity activity;
    public searchmodel(Activity activity){
        this.activity=activity;
    }

    public void editliner(EditText editText, recy_adpter recy_adpter){//搜索框输入框事件
        editText.addTextChangedListener(new TextWatcher() {
            @Override
            public void beforeTextChanged(CharSequence s, int start, int count, int after) {
            }

            @Override
            public void onTextChanged(CharSequence s, int start, int before, int count) {
            }
            @Override
            public void afterTextChanged(Editable s) {
                recy_adpter.searchstart(editText.getText().toString());
            }
        });

    }
}
